<template>
    <!--
        根据不同的类型(type)，对内容进行不同的排列
        *list_info      3：小微资讯【DONE】
        *list_article   22：文章【DONE】
        *list_pics      23：图集【DONE】
        *list_link      15：链接【DONE】
        *list_goods     16：商品【DONE】
        *list_video     5：视频【DONE】
        *list_live      2：直播【DONE】
        *list_album     4：专辑【DONE】
        *list_special   12：专题【DONE】
        *list_note      11：帖子【DONE】
    -->
    <div class="list-component-container">
        <!--<div>
        <Listaudio></Listaudio>
        </div>-->
        <div v-if="contents.rows.length!=0" v-for="(item,index) in contents.rows">
            <listinfo v-if="item.type==3" :info="item"></listinfo>
            <listarticle v-if="item.type==22" :info="item"></listarticle>
            <listpics v-if="item.type==23" :info="item"></listpics>
            <listlink v-if="item.type==15" :info="item"></listlink>
            <listgoods v-if="item.type==16" :info="item"></listgoods>
            <listvideo v-if="item.type==5" :info="item"></listvideo>
            <listlive v-if="item.type==2" :info="item"></listlive>
            <listalbum v-if="item.type==4" :info="item"></listalbum>
            <listspecial v-if="item.type==12" :info="item"></listspecial>
            <listnote v-if="item.type==11" :info="item"></listnote>
            <Listaudio v-if="item.type==24" :info="item"></Listaudio>
        </div>
    </div>

</template>

<script>
    export default {
        components: {
            Listinfo: function (resolve) {
                require(["./list_info.vue"], resolve);
            },
            Listarticle: function (resolve) {
                require(["./list_article.vue"], resolve);
            },
            Listpics: function (resolve) {
                require(["./list_pics.vue"], resolve);
            },
            Listlink: function (resolve) {
                require(["./list_link.vue"], resolve);
            },
            Listgoods: function (resolve) {
                require(["./list_goods.vue"], resolve);
            },
            Listvideo: function (resolve) {
                require(["./list_video.vue"], resolve);
            },
            Listlive: function (resolve) {
                require(["./list_live.vue"], resolve);
            },
            Listalbum: function (resolve) {
                require(["./list_album.vue"], resolve);
            },
            Listspecial: function (resolve) {
                require(["./list_special.vue"], resolve);
            },
            Listnote: function (resolve) {
                require(["./list_note.vue"], resolve);
            },
            Listaudio: function (resolve) {
                require(["./list_audio.vue"], resolve);
            }
        },
        props: {
            contents: {
                type: Object,
                default: function () {
                    return {};
                }
            }
        },
        mounted: function () {
            // let that = this;
            //
            // console.log("+++++++++++++++++++++++");
            //console.log(JSON.stringify(this.contents, undefined, 2));
            // console.log("+++++++++++++++++++++++");
        },
    }
</script>

<style>

</style>